package com.genreate.util.draw;

import cn.hutool.core.collection.ListUtil;

import java.util.List;

public class LotteryTest {

    public static void main(String[] args) {
        Lottery lottery1 = new Lottery();
        lottery1.setName("抽奖活动1");
        lottery1.setGl(1d);

        Lottery lottery2 = new Lottery();
        lottery2.setName("抽奖活动99");
        lottery2.setGl(99d);

        List<Lottery> of = ListUtil.of(lottery1, lottery2);
        for (int i = 0; i < 1000; i++) {
            Lottery draw = LotteryUtil.draw(of);
            if("抽奖活动1".equals(draw.getName())){
                System.out.println(draw.getName());
            }
        }
    }
}
